package com.rightsidetech.mall.dto.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

@Data
public class SpecsReq implements Serializable {

    @ApiModelProperty(value = "规格名称",required = true)
    @Pattern(regexp = "[\\u4e00-\\u9fa5a-zA-Z0-9-./()【】]{0,20}+",message = "规格不允许特殊字符长度最大为20")
    @NotBlank(message = "不可为空")
    private String specsName;

    @ApiModelProperty(value = "规格值")
    private List<@NotBlank(message = "规格值不可为空")@Pattern(regexp = "[\\u4e00-\\u9fa5a-zA-Z0-9-./()【】]{0,20}+",message = "规格不允许特殊字符长度最大为20")String> specsValue;
}
